﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using DataBase.Daihoctuonglai;

namespace dai_hoc_tuong_lai.Areas.Admin.Models
{
    public class CateAlbumModel
    {
        public int Id { get; set; }
        public string Name { get; set; }
        public string Mota { get; set; }
        public string Keyword { get; set; }
        public string KeyDescrption { get; set; }
        public string KeyTitle { get; set; }
        public Nullable<System.DateTime> DateCreate { get; set; }

        public static void MapFrom(CateAlbumModel Model, ref Cate_Album entity)
        {
            entity.Id = Model.Id;
            entity.Name = Model.Name;
            entity.Mota = Model.Mota;
            entity.DateCreate = Model.DateCreate;
            entity.Keyword = Model.Keyword;
            entity.KeyDescrption = Model.KeyDescrption;
            entity.KeyTitle = Model.KeyTitle;
        }

        public static void MapFrom(Cate_Album entity, ref CateAlbumModel Model)
        {
            Model.Id = entity.Id;
            Model.Name = entity.Name;
            Model.Mota = entity.Mota;
            Model.DateCreate = entity.DateCreate;
            Model.Keyword = entity.Keyword;
            Model.KeyDescrption = entity.KeyDescrption;
            Model.KeyTitle = entity.KeyTitle;
        }

    }

    public class AlbumModel
    {
        public int Id { get; set; }
        public string Name { get; set; }
        public string Mota { get; set; }
        public Nullable<int> CateId { get; set; }
        public string Anh { get; set; }
        public Nullable<System.DateTime> DateCreate { get; set; }

        public static void MapFrom(AlbumModel Model, ref Album entity)
        {
            entity.Id = Model.Id;
            entity.Name = Model.Name;
            entity.Mota = Model.Mota;
            entity.DateCreate = Model.DateCreate;
            entity.CateId = Model.CateId;
            entity.Anh = Model.Anh;
            
        }

        public static void MapFrom(Album entity, ref AlbumModel Model)
        {
            Model.Id = entity.Id;
            Model.Name = entity.Name;
            Model.Mota = entity.Mota;
            Model.DateCreate = entity.DateCreate;
            Model.CateId = entity.CateId;
            Model.Anh = entity.Anh;
        }
    }

}